package com.jonluo.common.utils;

import com.jonluo.common.exception.RReturnException;
import org.apache.commons.lang.StringUtils;

/**
 * 数据校验
 * @author com.jonluo
 * Date 2017/9/15
 */
public abstract class Assert {

    public static void isBlank(String str, String message) {
        if (StringUtils.isBlank(str)) {
            throw new RReturnException(message);
        }
    }

    public static void isNull(Object object, String message) {
        if (object == null) {
            throw new RReturnException(message);
        }
    }
}
